

import Foundation


public struct NDT7Measurement: Codable {

    public var appInfo: NDT7APPInfo?

    public var bbrInfo: NDT7BBRInfo?

    public var connectionInfo: NDT7ConnectionInfo?

    public var origin: NDT7TestConstants.Origin?

    public var direction: NDT7TestConstants.Kind?

    public let tcpInfo: NDT7TCPInfo?


    public var rawData: String?


    enum CodingKeys: String, CodingKey {
        case appInfo = "AppInfo"
        case bbrInfo = "BBRInfo"
        case connectionInfo = "ConnectionInfo"
        case origin = "Origin"
        case direction = "Test"
        case tcpInfo = "TCPInfo"
        case rawData = "rawData"
    }
}

public struct NDT7APPInfo: Codable {

    public let elapsedTime: Int64?


    public var numBytes: Int64?

    enum CodingKeys: String, CodingKey {
        case elapsedTime = "ElapsedTime"
        case numBytes = "NumBytes"
    }
}

public struct NDT7BBRInfo: Codable {

    public let elapsedTime: Int64?

    public let bandwith: Int64?

    public let minRtt: Int64?

    public let pacingGain: Int64?

    public let cwndGain: Int64?

    enum CodingKeys: String, CodingKey {
        case elapsedTime = "ElapsedTime"
        case bandwith = "BW"
        case minRtt = "MinRTT"
        case pacingGain = "PacingGain"
        case cwndGain = "CwndGain"
    }
}


public struct NDT7ConnectionInfo: Codable {


    public let client: String?

    public let server: String?

    public let uuid: String?

    enum CodingKeys: String, CodingKey {
        case client = "Client"
        case server = "Server"
        case uuid = "UUID"
    }
}


public struct NDT7TCPInfo: Codable {


    public let busyTime: Int64?


    public let bytesAcked: Int64?

    public let bytesReceived: Int64?

   
    public let bytesSent: Int64?

  
    public let bytesRetrans: Int64?


    public let elapsedTime: Int64?

   
    public let minRTT: Int64?

    public let rtt: Int64?

    public let rttVar: Int64?

    public let rwndLimited: Int64?

   
    public let sndBufLimited: Int64?

   
    enum CodingKeys: String, CodingKey {
        case busyTime = "BusyTime"
        case bytesAcked = "BytesAcked"
        case bytesReceived = "BytesReceived"
        case bytesSent = "BytesSent"
        case bytesRetrans = "BytesRetrans"
        case elapsedTime = "ElapsedTime"
        case minRTT = "MinRTT"
        case rtt = "RTT"
        case rttVar = "RTTVar"
        case rwndLimited = "RWndLimited"
        case sndBufLimited = "SndBufLimited"
    }
}
